import request from '@/utils/request'

// import request from '@/api/system/apis.js'

// 获取部门页面
export function resourcefindList(query) {
  return request({
    url: '/system/resource/findList',
    method: 'get',
    params: query
  })
}

// 获取地图数据
export function getMapTree(data) {
  return request({
    url: '/system/mapInfo/maptree',
    method: 'post',
    data: data
  })
}
// 获取部门页面
export function getLayerFenceList(query) {
  return request({
    url: '/system/fenceInfo/findListByFenceType?disable=layer,temporary&layerId=' + query,
    method: 'get',
    params: query
  })
}

export function getAllDeptDetail(query) {
  return request({
    url: '/system/resource/findList',
    method: 'get',
    params: query
  })
}

export function getCurrentLayerDetail(query) {
  return request({
    url: '/system/display/layerDetail?layerId=' + query,
    method: 'get',
    params: query
  })
}
// 获取地图

export function getMap(query) {
  return request({
    url: '/system/mapInfo/findById?idx=' + query,
    method: 'get'
  })
}

// 搜索资源所在层
export function searchResourceInLayer(data) {
  return request.get('/socket/display/findDisplay?resourceId=' + data)
}

